//
//  JQFYApplicationListController.m
//  JQFY
//
//  Created by 代辉 on 2017/10/25.
//  Copyright © 2017年 yannis. All rights reserved.
//

#import "JQFYApplicationListController.h"

@interface JQFYApplicationListController () <UITableViewDataSource,UITableViewDelegate>

@property (nonatomic,strong) UITableView *tableViewList;
@property (nonatomic,weak) UIImageView *navBGView;

@end
static NSString *cell_reuse = @"cell_reuse";

@implementation JQFYApplicationListController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNav];
    [self setupUI];
    
}

- (void)setupNav
{
    self.navigationItem.title = @"申请列表";
    UIImage *bgImage = [UIImage imageNamed:@"frame_top@2x(1)"];
    UIImageView *topBgImageView = [[UIImageView alloc] initWithImage:bgImage];
    [self.view addSubview:topBgImageView];
    self.navBGView = topBgImageView;
    [topBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view);
        make.left.right.equalTo(self.view);
    }];
}
- (void)setupUI
{
    [self.view addSubview:self.tableViewList];
    [self.tableViewList mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.navBGView.mas_bottom);
        make.left.right.bottom.equalTo(self.view);
    }];
}
- (UITableView *)tableViewList
{
    if (_tableViewList == nil) {
        _tableViewList = [[UITableView alloc] init];
        _tableViewList.dataSource = self;
        _tableViewList.delegate = self;
        [_tableViewList registerClass:[UITableViewCell class] forCellReuseIdentifier:cell_reuse];
        _tableViewList.tableFooterView = [UIView new];
    }
    return _tableViewList;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cell_reuse forIndexPath:indexPath];
    cell.textLabel.text = @"111";
    return cell;
}
@end
